<?php
/**
 * @package pmapi
 * @copyright Copyright (c)2014 Enrico Fagnoni
 * @license GNU General Public License version 3, or later
 *
 * @since 1.0.0
 */
 
defined('_JEXEC') or die;

if (!class_exists('HomepageView')) require(JPATH_COMPONENT.DS.'views'.DS.'homepage.php');

class PmapiViewProduct extends HomepageView
{
        
    public function getVirtuemartURI()
    {
         return 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$this->getId();
    }
    
    public function display($tpl = null) 
    {
        JFactory::getApplication()->redirect($this->getVirtuemartURI()); 
    }
}